package Io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class PersonDemo2 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fis = new FileInputStream(".");
        ObjectInputStream ois = new ObjectInputStream(fis);
        Object obj =  ois.readObject();
        Person p = (Person)obj;
        System.out.println(p);
        fis.close();
        ois.close();
    }
}
